﻿/*
{
"状态":1,
"名称":"删除-角色权限信息",
"作者":"陈泽椿",
"创建时间":"2018-06-30",
"功能":"删除-角色权限信息",
"log": [
	{"date":"06-01" , "dev" :"hzhh" , "content" : ""}
]
}
*/

declare @sql varchar(max)
declare @keys varchar(max)
declare @role_key int
set @role_key = '{role_key}'
set @keys = '{keys}'

set @sql = 'delete y_role_power where 1=1 and role_key = '+convert(varchar,@role_key)+' and power_key in ({ids})'

set @sql =REPLACE(@sql,'{ids}',@keys)

exec(@sql)